// CDWaveAnalysis.h  : Declaration of ActiveX Control wrapper class(es) created by Microsoft Visual C++

#pragma once

/////////////////////////////////////////////////////////////////////////////
// CDWaveAnalysis

class CDWaveAnalysis : public CWnd
{
protected:
	DECLARE_DYNCREATE(CDWaveAnalysis)
public:
	CLSID const& GetClsid()
	{
		static CLSID const clsid
			= { 0x29B94FB6, 0x5BD0, 0x4447, { 0xB9, 0x5E, 0xA2, 0x37, 0x40, 0x91, 0x19, 0xD8 } };
		return clsid;
	}
	virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle,
						const RECT& rect, CWnd* pParentWnd, UINT nID, 
						CCreateContext* pContext = NULL)
	{ 
		return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID); 
	}

    BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, 
				UINT nID, CFile* pPersist = NULL, BOOL bStorage = FALSE,
				BSTR bstrLicKey = NULL)
	{ 
		return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID,
		pPersist, bStorage, bstrLicKey); 
	}

// Attributes
public:

// Operations
public:

	void InitAx()
	{
		InvokeHelper(0x1, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
	}
	void AddChannel(short eid)
	{
		static BYTE parms[] = VTS_I2 ;
		InvokeHelper(0x2, DISPATCH_METHOD, VT_EMPTY, NULL, parms, eid);
	}
	short EndChannel()
	{
		short result;
		InvokeHelper(0x3, DISPATCH_METHOD, VT_I2, (void*)&result, NULL);
		return result;
	}
	void AddData(double x)
	{
		static BYTE parms[] = VTS_R8 ;
		InvokeHelper(0x4, DISPATCH_METHOD, VT_EMPTY, NULL, parms, x);
	}
	void CleanAll()
	{
		InvokeHelper(0x5, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
	}
	void SetMode(unsigned short mode)
	{
		static BYTE parms[] = VTS_UI2 ;
		InvokeHelper(0x6, DISPATCH_METHOD, VT_EMPTY, NULL, parms, mode);
	}
	void UpdateEverything()
	{
		InvokeHelper(0x7, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
	}
	void SetSamplingRate(unsigned long sr)
	{
		static BYTE parms[] = VTS_UI4 ;
		InvokeHelper(0x8, DISPATCH_METHOD, VT_EMPTY, NULL, parms, sr);
	}
	void SwitchViewType(short type)
	{
		static BYTE parms[] = VTS_I2 ;
		InvokeHelper(0x9, DISPATCH_METHOD, VT_EMPTY, NULL, parms, type);
	}
	unsigned long StartCalc()
	{
		unsigned long result;
		InvokeHelper(0xa, DISPATCH_METHOD, VT_UI4, (void*)&result, NULL);
		return result;
	}
	void SetChannelName(LPCTSTR name)
	{
		static BYTE parms[] = VTS_BSTR ;
		InvokeHelper(0xb, DISPATCH_METHOD, VT_EMPTY, NULL, parms, name);
	}
	void DrawToFile(LPCTSTR filename, unsigned short format, short ch, unsigned long w, unsigned long h)
	{
		static BYTE parms[] = VTS_BSTR VTS_UI2 VTS_I2 VTS_UI4 VTS_UI4 ;
		InvokeHelper(0xc, DISPATCH_METHOD, VT_EMPTY, NULL, parms, filename, format, ch, w, h);
	}


};
